package entity;

import java.util.Date;

import util.DateUtil;

/**
 * Round entity.
 * 
 * @author huiwensong.2012, huangjm.2012, mohameds.2012, sheryl.tay.2012, jaslin.wee.2012
 * 
 */


public class Round {

	public static final int ROUND_ONE = 1;
	public static final int ROUND_TWO = 2;

	private int roundNo;
	private boolean isRoundOpen;
	private Date startDatetime;
	private Date endDatetime;

	public Round(int roundNo, boolean isRoundOpen, Date startDatetime,
			Date endDatetime) {
		super();
		this.roundNo = roundNo;
		this.isRoundOpen = isRoundOpen;
		this.startDatetime = startDatetime;
		this.endDatetime = endDatetime;
	}

	public int getRoundNo() {
		return roundNo;
	}

	public Date getStartDatetime() {
		return startDatetime;
	}

	public Date getEndDatetime() {
		return endDatetime;
	}

	public String getStartDatetime(String pattern) {
		return DateUtil.formatDate(startDatetime, pattern);
	}

	public String getEndDatetime(String pattern) {
		return DateUtil.formatDate(endDatetime, pattern);
	}

	public boolean isRoundOpen() {
		return isRoundOpen;
	}

	@Override
	public String toString() {
		return "Round [roundNo=" + roundNo + ", isRoundOpen=" + isRoundOpen
				+ ", startDatetime=" + startDatetime + ", endDatetime="
				+ endDatetime + "]";
	}

}
